import request from '@/utils/request'

// 我的收藏
export function userApplyList() {
  return request({
    url: '/reception/apply/userApplyList',
    method: 'get'
  })
}
export function collectionUserApply(params) {
  return request({
    url: '/reception/apply/collectionUserApply',
    method: 'post',
    data: params
  })
}

// 可用应用一级
export function treeselect(params) {
	console.log(params)
  return request({
    url: '/reception/apply/treeselect',
    method: 'get',
  })
}
export function treeselect2(keyword) {
  return request({
    url: '/reception/apply/treeselect?menuName='+keyword,
    method: 'get',
  })
}
export function appList() {
  return request({
    url: '/reception/apply/list',
    method: 'get'
  })
}
// 可用卡片列表
export function cardList() {
  return request({
    url: '/reception/card/list',
    method: 'get'
  })
}

// 查询桌面列表

export function desktopList() {
  return request({
    url: '/reception/desktop/list',
    method: 'get'
  })
}

// 查询桌面详细信息
export function desktopDetails(desktopId) {
  return request({
    url: '/reception/folder/list',
    method: 'get',
    params: {
      desktopId: desktopId
    }
  })
}
// 新增桌面
export function desktopAdd(params) {
  return request({
    url: '/reception/desktop',
    method: 'post',
    data: params
  })
}

// 修改桌面
export function desktopEdit(params) {
  return request({
    url: '/reception/desktop',
    method: 'put',
    data: params
  })
}

// 新增桌面文件信息
export function addFolder(params) {
  return request({
    url: '/reception/folder/addReceptionFolder',
    method: 'post',
    data: params
  })
}

// 删除桌面
export function deleteDeskTop(id) {
  return request({
    url: '/reception/desktop/' + id,
    method: 'DELETE'
  })
}
/* 未读消息 */
export function getOaNotReading() {
  return request({
    url: '/reception/oa/getOaNotReading',
    method: 'get'
  })
}
/* 未读列表 */
export function getOaNotice(data) {
  return request({
    url: '/reception/oa/getOaNotice?searchValue='+data.input+"&fdNewsSource="+data.department+"&createTime="+data.time[0]+"&updateTime="+data.time[1],
    method: 'get'
  })
}
/* 未读详情 */
export function getOa(id) {
  return request({
    url: '/reception/oa/getOa/?fdId='+id,
    method: 'get'
  })
}
/* 搜素历史记录列表 */
export function list() {
  return request({
    url: 'reception/history/list',
    method: 'get'
  })
}
/* 删除单条记录 */
export function deleteId(id) {
  return request({
    url: 'reception/history/deleteId/?id='+id,
    method: 'get'
  })
}
/* 清空记录 */
export function deleteUserId() {
  return request({
    url: 'reception/history/deleteUserId',
    method: 'get'
  })
}
/* 消息列表翻页 */
export function getPost(query) {
  return request({
	 url: 'reception/oa/getPost',
    method: 'get',
    params: query
  })
}

/* 修改密码 */
export function updatePwd(params) {
  return request({
    url: '/system/user/profile/updatePwd',
    method: 'put',
    params: params
  })
}
